Skip to main content

I2C Slave Nodes

The i2c slave library allow users to create i2c slave.

Config Nodes

i2c config

Handles settings for communication using I2C.

Inputs

  • I2C Port : Specifies the I2C interface (e.g., I2C1, I2C2) used for communication.
  • SDA Pin : The pin used for data transfer in I2C communication.
  • SCL Pin : The pin used for the clock signal in I2C communication.
  • Slave Address : The unique 7-bit or 10-bit address assigned to an I2C slave device for identification during communication.
  • Address Mode : Specifies the format of the slave address in I2C communication, either 7-bit or 10-bit addressing.
  • SDA Pullup Enable : Activates the pull-up resistor on the SDA (data) line to ensure proper I2C signal levels.
  • SCL Pullup Enable : Activates the pull-up resistor on the SCL (clock) line to ensure proper I2C signal levels.

Proc Nodes

i2c slave transfer

transrecieve the data from the I2C communication.

Inputs

  • I2C port : Specifies the I2C interface (e.g., I2C1, I2C2) used for communication.
  • Read / Write : Read data from i2c slave device and write data to the slave device
  • Data : The actual information (bytes) being transmitted between the I2C master and slave devices during communication.
  • Recieve length : Specifies the number of bytes the slave device expects to receive from the master during an I2C read operation.

Outputs

  • data :

i2c slave write

Perform a write to a device connected to a particular I2C port.

Inputs

  • I2C port : Specifies the I2C interface (e.g., I2C1, I2C2) used for communication.
  • Write Data : Refers to the data that the slave device sends to the master during an I2C write operation.
  • Size : Specifies the number of bytes of data the slave device will send or receive during an I2C operation.
  • Ticks to wait : Specifies the number of clock cycles the slave waits before proceeding with the next action or operation in I2C communication.

i2c slave read

Perform a read to a device connected to a particular I2C port.

Inputs

  • I2C port : Specifies the I2C bus/interface (e.g., I2C0, I2C1) the slave device is connected to for communication with the master.
  • Read Data : Retrieves data from an I2C slave device to the I2C master.
  • Size : Specifies the number of bytes of data the slave device will send or receive during an I2C operation.
  • Ticks to wait : Specifies the number of clock cycles the slave waits before proceeding with the next action or operation in I2C communication.